#ifndef LCAUPROCESSOR_H_
#define LCAUPROCESSOR_H_

#include <MTXml/MTXml.h>
#include <MAUtil/String.h>
#include "DTO.h"

using namespace MAUtil;
using namespace Mtx;

class LCAUProcessor : public XmlListener
{
  public:
    LCAUProcessor();
    ~LCAUProcessor();

    //XmlListener
    void mtxEncoding(const char* value);
    void mtxTagStart(const char* name, int len);
    void mtxTagAttr(const char* attrName, const char* attrValue);
    void mtxTagStartEnd();
    void mtxTagData(const char* data, int len);
    void mtxTagEnd(const char* name, int len);
    void mtxParseError();
    void mtxEmptyTagEnd();
    unsigned char mtxUnicodeCharacter(int unicode);

    //Property setters
    void setLCAUListener(LCAUListener* listener);
    void addRequest(String& url, LCAUListener* requester);

  private:
    enum LCAU_Tags
    {
    	LCAU_NULL,
    	LCAU_ID,
    	LCAU_NAME,
    	LCAU_ISCHARGING,
    	LCAU_SMSCNT,
    	LCAU_SHORTCODE,
    	LCAU_OLFLAG,
    	LCAU_PRICE,
    	LCAU_RESULT,
    	LCAU_DRAWDATE,
    	LCAU_OUTOFDATE
    } mLCAUTag;

    LCAUListener* mListener;
    LCAUItem mCurrentItem;
    String temp;
    String mFirstTag;
    bool mInBody;
    bool mInItem;
};

#endif /* LCAUPROCESSOR_H_ */
